package com.dome.user.controller;

import com.dome.base.service.SubmitTokenService;
import com.dome.client.config.result.RtnResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/submit-token")
@Api(tags = "重复提交token生成器")
public class SubmitTokenController {

    @Autowired
    private SubmitTokenService submitTokenService;

    @PostMapping(value = "create", produces = "application/json")
    @ApiOperation(value = "新增提交token", notes = "新增提交token")
    public RtnResultVO<String> createToken() {
        String token = submitTokenService.createToken();
        return RtnResultVO.Success(token);
    }
}